package com.wan37.logic.service.impl;

import com.wan37.logic.dao.UserWeaponryDao;
import com.wan37.logic.domain.entity.UserWeaponryDO;
import com.wan37.logic.service.UserWeaponryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author : luoyong
 * @date : 2020-06-17 15:36
 **/
@Service("userWeaponryService")
public class UserWeaponryServiceImpl implements UserWeaponryService {
    @Autowired
    UserWeaponryDao userWeaponryDao;

    @Override
    public List<UserWeaponryDO> getUserWeaponryDOsByUserId(String userId) {
        return userWeaponryDao.getUserWeaponryDOByUserId(userId);
    }

    @Override
    public boolean deleteBySelfWeaponryId(String selfWeaponryId) {
        return userWeaponryDao.deleteBySelfWeaponryId(selfWeaponryId);
    }

    @Override
    public boolean update(UserWeaponryDO userWeaponryDO) {
        return userWeaponryDao.update(userWeaponryDO);
    }

    @Override
    public boolean save(UserWeaponryDO userWeaponryDO) {
        return userWeaponryDao.add(userWeaponryDO);
    }

    @Override
    public boolean delete(UserWeaponryDO userWeaponryDO) {
        return userWeaponryDao.delete(userWeaponryDO.getId());
    }

}
